import React from 'react'

export default function Msg(props) {
        console.log(props);
    return (
        <div>
            <h2>这是一个msg组件</h2>
            <h3>{props.msg}</h3>
            <button onClick={() => {
                props.setMsg(props.msg+' A');
            }}>修改消息</button>
        </div>
    )
}
